//
//  UpdateAccessOperation.h
//  UCiEnabler
//
//  Created by Delio Brignoli on 26/07/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum {
	IEnablerServiceStatusUnknown = 0,
	IEnablerServiceNotReachable,
	IEnablerServiceUpdateCancelled,
	IEnablerServiceError,
	_IEnablerServiceLastError,
	IEnablerServiceUpdating,
	IEnablerServiceReachable,
	IEnablerServiceAccessEnabled,
	IEnablerServiceAccessDisabled
} IEnablerStatus;

@interface UpdateAccessOperation : NSOperation {
	IEnablerStatus currentStatus;
	IEnablerStatus targetStatus;
	
	NSString *username;
	NSString *password;
	NSString *hint;
	NSString *reason;
}

- (id)initWithStatus:(IEnablerStatus)targetStatus for:(NSString *)username with:(NSString *)password;
- (void)reset;

@property (nonatomic, assign) IEnablerStatus currentStatus;
@property (nonatomic, assign) IEnablerStatus targetStatus;
@property (nonatomic, retain) NSString *username;
@property (nonatomic, retain) NSString *password;
@property (nonatomic, retain) NSString *hint;
@property (nonatomic, retain) NSString *reason;

@end

@interface DeduceAccessOperation : UpdateAccessOperation {
}

- (id)init;

@end
